<%--
  Created by IntelliJ IDEA.
  User: cjegzfz
  Date: 2020/9/3
  Time: 7:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page trimDirectiveWhitespaces="true"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme() + "://" + request.getServerName()
          + ":" + request.getServerPort() + path + "/";
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title></title>
  <link href="<%=basePath%>Css/Content.css" rel="stylesheet" type="text/css" />
  <!-- Bootstrap Core CSS -->
  <link href="<%=basePath%>Css/bootstrap.min.css" rel="stylesheet" />
  <link href="<%=basePath%>Css/button.css" rel="stylesheet" type="text/css" />
  <link href="<%=basePath%>Css/dataTables.bootstrap.css" rel="stylesheet" />
  <link href="<%=basePath%>Css/metisMenu.min.css" rel="stylesheet" />
  <!-- 引入js文件 -->
  <!-- jQuery -->
  <script src="<%=basePath%>js/jquery-1.11.3.min.js"></script>
  <!-- Bootstrap Core JavaScript -->
  <script src="<%=basePath%>js/bootstrap.min.js"></script>
  <!-- Metis Menu Plugin JavaScript -->
  <script src="<%=basePath%>js/metisMenu.min.js"></script>
  <!-- DataTables JavaScript -->
  <script src="<%=basePath%>js/jquery.dataTables.min.js"></script>
  <script src="<%=basePath%>js/dataTables.bootstrap.min.js"></script>

  <!-- Custom Theme JavaScript -->
  <script src="<%=basePath%>js/sb-admin-2.js"></script>
  <script type="text/JavaScript">

    function addUser(){
      var form = document.forms[0];
      form.action = "<%=basePath%>/addUser.action";
      form.method="post";
      form.submit();
    }
    var $ = function (id) {
      return document.getElementById(id);
    }

    function show_menu(num) {
      for (j = 0; j < 100; j++) {
        if (j != num) {
          if ($('Oli' + j)) {
            $('Oli' + j).style.display = 'none';
            $('O' + j).style.background = 'url(images/01.gif)';
          }
        }
      }
      if ($('Oli' + num)) {
        if ($('Oli' + num).style.display == 'block') {
          $('Oli' + num).style.display = 'none';
          $('O' + num).style.background = 'url(images/01.gif)';
        } else {
          $('Oli' + num).style.display = 'block';
          $('O' + num).style.background = 'url(images/02.gif)';
        }
      }
    }

    var temp = 0;

    function menu_hide_show() {
      if (temp == 0) {
        document.getElementById('LeftBox').style.display = 'none';
        document.getElementById('RightBox').style.marginLeft = '0';
        document.getElementById('Mobile').style.background = 'url(images/menu_show.gif)';
        temp = 1;
      }
      else {
        document.getElementById('RightBox').style.marginLeft = '222px';
        document.getElementById('LeftBox').style.display = 'block';
        document.getElementById('Mobile').style.background = 'url(images/menu_hide.gif)';
        temp = 0;
      }
    }

  </script>
</head>

<body>

<div class="div_top" >学生信息添加</div>
<div class="row">
  <div class="col-sm-3"></div>
  <div class="col-sm-6">
    <form  class="form-horizontal" style="margin-top: 30px" name="CustomerForm">
      <div class="form-group">
        <label for="studentClass" class="col-sm-2 control-label">
          班级
        </label>
        <div class="col-sm-10">
          <select class="form-control" id="studentClass" name="studentClass">
            <c:forEach items="${cClasses}" var="cClass" >
              <option value="${cClass.studentClass}" >${cClass.studentClass}</option>
            </c:forEach>
          </select>

        </div>
      </div>
      <div class="form-group">
        <label for="sex" class="col-sm-2 control-label">
          性别
        </label>
        <div class="col-sm-10">
          <select class="form-control" id="sex"  name="sex">
            <option value="女" >女</option>
            <option value="男"  >男</option>
          </select>
        </div>
      </div>
<%--      <div class="form-group">--%>
<%--        <label for="id" class="col-sm-2 control-label">--%>
<%--          学号--%>
<%--        </label>--%>
<%--        <div class="col-sm-10"><input class="form-control" id="id"  type="text" name="id" value="">--%>
<%--        </div>--%>
<%--      </div>--%>
      <div class="form-group">
        <label for="username" class="col-sm-2 control-label">
          学生名
        </label>
        <div class="col-sm-10"><input  class="form-control" type="text" id="username" name="username">
        </div>
      </div>

      <div class="form-group">
        <label for="address"  class="col-sm-2 control-label">
          地址
        </label>
        <div class="col-sm-10"><input class="form-control" type="text" id="address" name="address">
        </div>
      </div>
      <div class="form-group">
        <label for="phone" class="col-sm-2 control-label">
          电话
        </label>
        <div class="col-sm-10">
          <input type="text" class="form-control" id="phone" name="phone">
        </div>
      </div>

      <div class="form-group">
        <div class="col-sm-5"></div>
        <div class="col-sm-2">
          <input type="button" class="button button-primary button-3d button-small" value="添加" onclick="addUser()">
        </div>
        <div class="col-sm-5"></div>
      </div>
    </form>
  </div>
  <div class="col-sm-3"></div>
</div>
</body>




</body>
</html>
<%--<div class="form-group">--%>
<%--  <label for="studentClass" class="col-sm-2 control-label">--%>
<%--    班级--%>
<%--  </label>--%>
<%--  <div class="col-sm-10">--%>
<%--    <select class="form-control" id="studentClass" name="studentClass">--%>
<%--      <c:forEach items="${Users}" var="user">--%>
<%--        <option value="${user.studentClass}"  >${user.studentClass}</option>--%>
<%--      </c:forEach>--%>
<%--    </select>--%>

<%--  </div>--%>
<%--</div>--%>